package(default_visibility=["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//:packages.bzl", "MATERIAL_TARGETS", "CDK_TARGETS")
load("//tools:defaults.bzl", "ng_module")
load("//tools:sass_generate_binaries.bzl", "sass_generate_binaries")

# Generate sass binaries for all nested SCSS files.
sass_generate_binaries("dev_app_scss", glob(["**/*.scss"], exclude = ["theme.scss"]), [
  # Needed for the input-demo sass file that uses CDK text-field mixins.
  "//src/cdk/text-field:text_field_scss_lib"
])

ng_module(
  name = "dev-app",
  srcs = glob(["**/*.ts"], exclude = ["system-config.ts", "system-rxjs-operators.ts"]),
  assets = glob(["**/*.html"]) + [":dev_app_scss", ":theme"],
  deps = [
    "@angular//packages/common",
    "@angular//packages/common/http",
    "@angular//packages/core",
    "@angular//packages/elements",
    "@angular//packages/forms",
    "@angular//packages/platform-browser",
    "@angular//packages/platform-browser-dynamic",
    "@angular//packages/platform-browser/animations",
    "@angular//packages/router",
    "@rxjs",
    "@rxjs//operators",
    "//src/cdk-experimental",
    "//src/material-examples:examples",
  ] + CDK_TARGETS + MATERIAL_TARGETS
)

sass_binary(
  name = "theme",
  src = "theme.scss",
  deps = [
    "//src/lib/core:all_themes"
  ]
)
